package com.xiaolanshu.exception;

import com.xiaolanshu.vo.ErrorResult;
import lombok.Data;

@Data
public class BusinessException extends RuntimeException {

    private ErrorResult errorResult;

    public BusinessException(ErrorResult result){
        //将错误信息传给RuntimeException
        super(result.getErrMessage());
        this.errorResult = result;

    }

}
